//
//  ZCSTKPlayer.m
//  NetEaseNews_ProjectA
//
//  Created by 张闯的mac pro on 15/11/2.
//  Copyright © 2015年 张闯. All rights reserved.
//

#import "ZCSTKPlayer.h"

@implementation ZCSTKPlayer

+ (ZCSTKPlayer *)shareInstance
{
    static ZCSTKPlayer *player = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        
        player = [[ZCSTKPlayer alloc] initWithOptions:(STKAudioPlayerOptions){ .flushQueueOnSeek = YES, .enableVolumeMixer = YES, .equalizerBandFrequencies = {50, 100, 200, 400, 800, 1600, 2600, 16000} }];
    });
    return player;
}

- (void)playURL:(NSURL *)url
{
    [self stop];
    self.player = [[STKAudioPlayer alloc] init];
    [self.player playURL:url];
}

- (void)stop
{
    if (self.player) {
        [self.player stop];
    }
}






@end
